#include <bits/stdc++.h>

using namespace std;

int main () {
   std::ifstream is ("seekg.cpp");
   if (is) {
      is.seekg (0, is.end);
      int length = is.tellg();
      is.seekg (0, is.beg); // go to first byte in file
      char * buffer = new char [length];
      is.read (buffer,length);
      is.close();
      std::cout.write (buffer,length);
      delete[] buffer;
   }
   return 0;
}
